<template>
  <van-cell is-link center class="myCell">
    <template #title>
      <div class="title">
        {{ title }}
      </div>
    </template>
    <template #default>
      <img class="imgs" v-if="type === 'img' && value" :src="value" alt="" />
      <img
        class="imgs"
        v-else-if="type === 'img' && !value"
        src="@/assets/logo.png"
        alt=""
      />
      <div v-else class="value">
        {{ value }}
      </div>
    </template>
    <template #icon>
      <div class="icon">
        <i class="iconfont" v-html="icon"></i>
      </div>
    </template>
  </van-cell>
</template>

<script>
export default {
  props: ['title', 'icon', 'value', 'type'],
  data () {
    return {}
  }
}
</script>

<style lang="less" scoped>
.myCell {
  .title {
    font-family: MicrosoftYaHei;
    font-size: 15px;
    font-weight: normal;
    font-stretch: normal;
    letter-spacing: 0px;
    color: #333333;
  }
  .imgs {
    width: 23px;
    height: 23px;
    background-color: #e0e0e0;
    border-radius: 50%;
  }
}
</style>
